﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class TWFAUF
    {

        public TWFAUF()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VICC_WFEVENTS();
            this.DataContext = MV;
            InitializeComponent();
        }
        public override void OnEXAUFChg(string vlaue)
        {
            if (EXAUF == "")
                return;
            KRS = EXAUF.Substring(0, 2);
            LFD = EXAUF.Substring(2, 6);
            POS = EXAUF.Substring(8, 3);
            base.OnEXAUFChg(vlaue);
        }
        public override void QueryCommand(object sender, RoutedEventArgs e)
        {
            try
            {
                dwData = TBMain.NewRow();
                dwData["MANDANT"] = app.Mandant;
                dwData["KRS"] = KRS;
                dwData["LFD"] = LFD;
                dwData["POS"] = POS;
                SResult = TMV.QWF06(dwData);
                MergeData(SResult, false, true);
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
        }
    }
}
